www.gusucode.com > 24Beta 虚拟主机版 1.0.0 Beta源码程序 > 24Beta 虚拟主机版 1.0.0 Beta源码程序/24Beta-1.0.0-vhost/protected/models/AdDetail.php
<?php class AdDetail extends CActiveRecord { /** * The followings are the available columns in table 'Addetail': * @var integer $id * @var integer $aid * @var string $code * @var integer $create_time * @var string $create_ip * @var integer $update_time * @var string $update_ip * @var integer $user_id */ /** * Returns the static model of the specified AR class. * @return CActiveRecord the static model class */ public static function model($className=__CLASS__) { return parent::model($className); } /** * @return string the associated database table name */ public function tableName() { return 'AdDetail'; } /** * @return array validation rules for model attributes. */ public function rules() { return array( array('create_ip','length','max'=>15), array('update_ip','length','max'=>15), array('ad_id, create_time, update_time', 'required'), array('ad_id, create_time, update_time, user_id', 'numerical', 'isused', 'integerOnly'=>true), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array( ); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'id'=>'Id', 'aid'=>'Aid', 'code'=>'Code', 'create_time'=>'Create Time', 'create_ip'=>'Create Ip', 'update_time'=>'Update Time', 'update_ip'=>'Update Ip', 'user_id'=>'User', ); } }